package T;

/**
 * @Author:zimmor
 * @Date: 2021/10/29 8:50
 * @Description 有一个类型参数的泛型类
 * @version: 1.0.0
 */

public class Number<T> {
    private T firstNum;
    private T secondNum;

    public static <U> void printAll(U u) {
        System.out.println("u = " + u);
    }
    public Number(T firstNum, T secondNum) {
        this.firstNum = firstNum;
        this.secondNum = secondNum;
    }

    public T getFirstNum() {
        return firstNum;
    }

    public void setFirstNum(T firstNum) {
        this.firstNum = firstNum;
    }

    public T getSecondNum() {
        return secondNum;
    }

    public void setSecondNum(T secondNum) {
        this.secondNum = secondNum;
    }
}
